package com.itheima.date;

import java.util.Date;

public class Test {

    public static void main(String[] args) {
        //创建对象
        Date date = new Date();
        System.out.println(date);
        Date date1 = new Date(1512643153415L);
        System.out.println(date1);

        long time = date.getTime();
        System.out.println(time);
        System.out.println(System.currentTimeMillis());

        date1.setTime(1512643153415L+3600*1000*24*3);
        System.out.println(date1);
        date1.setYear(135);
        date1.setMonth(1);
        date1.setDate(28);
        date1.setHours(13);
        date1.setMinutes(10);
        date1.setSeconds(50);
        System.out.println(date1);//2020-11-7 10:06:35


    }
}
